package com.isoftstone.merchant.service.payment.impl;

import com.isoftstone.merchant.dao.payment.MPaymentDetailMapper;
import com.isoftstone.merchant.entity.payment.MPaymentDetail;
import com.isoftstone.merchant.service.payment.IMPaymentDetialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MPaymentDetialService implements IMPaymentDetialService {

    @Autowired
    private MPaymentDetailMapper mPaymentDetailMapper;

    public void addPaymentDetail(MPaymentDetail mPaymentDetail){
        mPaymentDetailMapper.insertPaymentDetail(mPaymentDetail);
    }


    public void deleteFormPaymentDetail(Long payId,Long projectId){
        mPaymentDetailMapper.deleteFormPaymentDetailByDoubleId(payId,projectId);
    }

    @Override
    public void updatePaymentDetail(Long payId, Double factAmt) throws Exception {
        mPaymentDetailMapper.updatePaymentDetail(payId,factAmt);
    }
}
